set term postscript eps enhanced color

# Estimates @ iteration 100

set output "estimates_it100.eps"
set xlabel "Node ID"
set ylabel "Estimate of the average"
set boxwidth 1

plot "estimates_it100.dat" using 1:2 title "In-degree distribution" with boxes

# The fraction of nodes that estimate the average bandwidth correctly

set output "estimated_correctly.eps"
set xlabel "Round of the algorithm"
set ylabel "Fraction of node estimating correctly"
set xrange [0:50]
#set yrange [0:500]

plot "aggregation.dat" using 1:2 with linespoints title "Margin of 1", "aggregation.dat" using 1:3 with linespoints title "Margin of 0.1"

# Standard deviation of estimates

set output "deviation.eps"
set xlabel "Round of the algorithm"
set ylabel "Standard deviation of estimations"
set xrange [0:50]
#set yrange [0:500]

plot "aggregation.dat" using 1:4 with linespoints title "Standard deviation of estimates"

